<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="dialogflow_v3.html">Dialogflow API</a> . <a href="dialogflow_v3.projects.html">projects</a> . <a href="dialogflow_v3.projects.locations.html">locations</a> . <a href="dialogflow_v3.projects.locations.agents.html">agents</a> . <a href="dialogflow_v3.projects.locations.agents.webhooks.html">webhooks</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a webhook in the specified agent.</p>
<p class="toc_element">
  <code><a href="#delete">delete(name, force=None, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes the specified webhook.</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Retrieves the specified webhook.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Returns the list of all webhooks in the specified agent.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates the specified webhook.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
  <pre>Creates a webhook in the specified agent.

Args:
  parent: string, Required. The agent to create a webhook for. Format: `projects//locations//agents/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # Webhooks host the developer&#x27;s business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow&#x27;s natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  &quot;disabled&quot;: True or False, # Indicates whether the webhook is disabled.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the webhook, unique within the agent.
  &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Configuration for a generic web service.
    &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
      &quot;A String&quot;,
    ],
    &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
    &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
      &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
      &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
      &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
        &quot;A String&quot;,
      ],
      &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
    },
    &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
    &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
    &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
    &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
      &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
        &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      },
    },
    &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
      &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
    },
    &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
    &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
    &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
    &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
  },
  &quot;name&quot;: &quot;A String&quot;, # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  &quot;serviceDirectory&quot;: { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
        &quot;A String&quot;,
      ],
      &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
      &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
        &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
        &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
        &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
          &quot;A String&quot;,
        ],
        &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
      },
      &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
      &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
      &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
        &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
          &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        },
      },
      &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
        &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
      },
      &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
      &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
      &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
      &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
    },
    &quot;service&quot;: &quot;A String&quot;, # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  &quot;timeout&quot;: &quot;A String&quot;, # Webhook execution timeout. Execution is considered failed if Dialogflow doesn&#x27;t receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Webhooks host the developer&#x27;s business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow&#x27;s natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  &quot;disabled&quot;: True or False, # Indicates whether the webhook is disabled.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the webhook, unique within the agent.
  &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Configuration for a generic web service.
    &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
      &quot;A String&quot;,
    ],
    &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
    &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
      &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
      &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
      &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
        &quot;A String&quot;,
      ],
      &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
    },
    &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
    &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
    &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
    &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
      &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
        &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      },
    },
    &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
      &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
    },
    &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
    &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
    &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
    &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
  },
  &quot;name&quot;: &quot;A String&quot;, # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  &quot;serviceDirectory&quot;: { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
        &quot;A String&quot;,
      ],
      &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
      &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
        &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
        &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
        &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
          &quot;A String&quot;,
        ],
        &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
      },
      &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
      &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
      &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
        &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
          &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        },
      },
      &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
        &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
      },
      &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
      &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
      &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
      &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
    },
    &quot;service&quot;: &quot;A String&quot;, # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  &quot;timeout&quot;: &quot;A String&quot;, # Webhook execution timeout. Execution is considered failed if Dialogflow doesn&#x27;t receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
}</pre>
</div>

<div class="method">
    <code class="details" id="delete">delete(name, force=None, x__xgafv=None)</code>
  <pre>Deletes the specified webhook.

Args:
  name: string, Required. The name of the webhook to delete. Format: `projects//locations//agents//webhooks/`. (required)
  force: boolean, This field has no effect for webhook not being used. For webhooks that are used by pages/flows/transition route groups: * If `force` is set to false, an error will be returned with message indicating the referenced resources. * If `force` is set to true, Dialogflow will remove the webhook, as well as any references to the webhook (i.e. Webhook and tagin fulfillments that point to this webhook will be removed).
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>Retrieves the specified webhook.

Args:
  name: string, Required. The name of the webhook. Format: `projects//locations//agents//webhooks/`. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Webhooks host the developer&#x27;s business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow&#x27;s natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  &quot;disabled&quot;: True or False, # Indicates whether the webhook is disabled.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the webhook, unique within the agent.
  &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Configuration for a generic web service.
    &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
      &quot;A String&quot;,
    ],
    &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
    &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
      &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
      &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
      &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
        &quot;A String&quot;,
      ],
      &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
    },
    &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
    &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
    &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
    &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
      &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
        &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      },
    },
    &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
      &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
    },
    &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
    &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
    &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
    &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
  },
  &quot;name&quot;: &quot;A String&quot;, # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  &quot;serviceDirectory&quot;: { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
        &quot;A String&quot;,
      ],
      &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
      &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
        &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
        &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
        &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
          &quot;A String&quot;,
        ],
        &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
      },
      &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
      &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
      &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
        &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
          &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        },
      },
      &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
        &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
      },
      &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
      &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
      &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
      &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
    },
    &quot;service&quot;: &quot;A String&quot;, # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  &quot;timeout&quot;: &quot;A String&quot;, # Webhook execution timeout. Execution is considered failed if Dialogflow doesn&#x27;t receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Returns the list of all webhooks in the specified agent.

Args:
  parent: string, Required. The agent to list all webhooks for. Format: `projects//locations//agents/`. (required)
  pageSize: integer, The maximum number of items to return in a single page. By default 100 and at most 1000.
  pageToken: string, The next_page_token value returned from a previous list request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response message for Webhooks.ListWebhooks.
  &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results, or empty if there are no more results in the list.
  &quot;webhooks&quot;: [ # The list of webhooks. There will be a maximum number of items returned based on the page_size field in the request.
    { # Webhooks host the developer&#x27;s business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow&#x27;s natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
      &quot;disabled&quot;: True or False, # Indicates whether the webhook is disabled.
      &quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the webhook, unique within the agent.
      &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Configuration for a generic web service.
        &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
          &quot;A String&quot;,
        ],
        &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
        &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
          &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
          &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
          &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
            &quot;A String&quot;,
          ],
          &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
        },
        &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
          &quot;a_key&quot;: &quot;A String&quot;,
        },
        &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
        &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
        &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
          &quot;a_key&quot;: &quot;A String&quot;,
        },
        &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
          &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
            &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          },
        },
        &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
          &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
        },
        &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
        &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
        &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
        &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
      },
      &quot;name&quot;: &quot;A String&quot;, # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
      &quot;serviceDirectory&quot;: { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
        &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
          &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
            &quot;A String&quot;,
          ],
          &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
          &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
            &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
            &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
            &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
              &quot;A String&quot;,
            ],
            &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
          },
          &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
            &quot;a_key&quot;: &quot;A String&quot;,
          },
          &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
          &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
          &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
            &quot;a_key&quot;: &quot;A String&quot;,
          },
          &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
          &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
            &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
              &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
            },
          },
          &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
            &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
          },
          &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
          &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
          &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
          &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
        },
        &quot;service&quot;: &quot;A String&quot;, # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
      },
      &quot;timeout&quot;: &quot;A String&quot;, # Webhook execution timeout. Execution is considered failed if Dialogflow doesn&#x27;t receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
  <pre>Updates the specified webhook.

Args:
  name: string, The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`. (required)
  body: object, The request body.
    The object takes the form of:

{ # Webhooks host the developer&#x27;s business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow&#x27;s natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  &quot;disabled&quot;: True or False, # Indicates whether the webhook is disabled.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the webhook, unique within the agent.
  &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Configuration for a generic web service.
    &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
      &quot;A String&quot;,
    ],
    &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
    &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
      &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
      &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
      &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
        &quot;A String&quot;,
      ],
      &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
    },
    &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
    &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
    &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
    &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
      &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
        &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      },
    },
    &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
      &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
    },
    &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
    &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
    &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
    &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
  },
  &quot;name&quot;: &quot;A String&quot;, # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  &quot;serviceDirectory&quot;: { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
        &quot;A String&quot;,
      ],
      &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
      &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
        &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
        &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
        &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
          &quot;A String&quot;,
        ],
        &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
      },
      &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
      &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
      &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
        &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
          &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        },
      },
      &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
        &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
      },
      &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
      &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
      &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
      &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
    },
    &quot;service&quot;: &quot;A String&quot;, # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  &quot;timeout&quot;: &quot;A String&quot;, # Webhook execution timeout. Execution is considered failed if Dialogflow doesn&#x27;t receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
}

  updateMask: string, The mask to control which fields get updated. If the mask is not present, all fields will be updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Webhooks host the developer&#x27;s business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow&#x27;s natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
  &quot;disabled&quot;: True or False, # Indicates whether the webhook is disabled.
  &quot;displayName&quot;: &quot;A String&quot;, # Required. The human-readable name of the webhook, unique within the agent.
  &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Configuration for a generic web service.
    &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
      &quot;A String&quot;,
    ],
    &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
    &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
      &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
      &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
      &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
        &quot;A String&quot;,
      ],
      &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
    },
    &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
    &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
    &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
      &quot;a_key&quot;: &quot;A String&quot;,
    },
    &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
    &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
      &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
        &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      },
    },
    &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
      &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
    },
    &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
    &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
    &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
    &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
  },
  &quot;name&quot;: &quot;A String&quot;, # The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: `projects//locations//agents//webhooks/`.
  &quot;serviceDirectory&quot;: { # Represents configuration for a [Service Directory](https://cloud.google.com/service-directory) service. # Configuration for a [Service Directory](https://cloud.google.com/service-directory) service.
    &quot;genericWebService&quot;: { # Represents configuration for a generic web service. # Generic Service configuration of this webhook.
      &quot;allowedCaCerts&quot;: [ # Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google&#x27;s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with &quot;subject alt name&quot;. For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile &lt;(printf &quot;\nsubjectAltName=&#x27;DNS:www.example.com&#x27;&quot;) ```
        &quot;A String&quot;,
      ],
      &quot;httpMethod&quot;: &quot;A String&quot;, # Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
      &quot;oauthConfig&quot;: { # Represents configuration of OAuth client credential flow for 3rd party API authentication. # Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
        &quot;clientId&quot;: &quot;A String&quot;, # Required. The client ID provided by the 3rd party platform.
        &quot;clientSecret&quot;: &quot;A String&quot;, # Optional. The client secret provided by the 3rd party platform.
        &quot;scopes&quot;: [ # Optional. The OAuth scopes to grant.
          &quot;A String&quot;,
        ],
        &quot;secretVersionForClientSecret&quot;: &quot;A String&quot;, # Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        &quot;tokenEndpoint&quot;: &quot;A String&quot;, # Required. The token endpoint provided by the 3rd party platform to exchange an access token.
      },
      &quot;parameterMapping&quot;: { # Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;password&quot;: &quot;A String&quot;, # The password for HTTP Basic authentication.
      &quot;requestBody&quot;: &quot;A String&quot;, # Optional. Defines a custom JSON object as request body to send to flexible webhook.
      &quot;requestHeaders&quot;: { # The HTTP request headers to send together with webhook requests.
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;secretVersionForUsernamePassword&quot;: &quot;A String&quot;, # Optional. The SecretManager secret version resource storing the username:password pair for HTTP Basic authentication. Format: `projects/{project}/secrets/{secret}/versions/{version}`
      &quot;secretVersionsForRequestHeaders&quot;: { # Optional. The HTTP request headers to send together with webhook requests. Header values are stored in SecretManager secret versions. When the same header name is specified in both `request_headers` and `secret_versions_for_request_headers`, the value in `secret_versions_for_request_headers` will be used.
        &quot;a_key&quot;: { # Represents the value of an HTTP header stored in a SecretManager secret version.
          &quot;secretVersion&quot;: &quot;A String&quot;, # Required. The SecretManager secret version resource storing the header value. Format: `projects/{project}/secrets/{secret}/versions/{version}`
        },
      },
      &quot;serviceAccountAuthConfig&quot;: { # Configuration for authentication using a service account. # Optional. Configuration for service account authentication.
        &quot;serviceAccount&quot;: &quot;A String&quot;, # Required. The email address of the service account used to authenticate the webhook call. Dialogflow uses this service account to exchange an access token and the access token is then sent in the `Authorization` header of the webhook request. The service account must have the `roles/iam.serviceAccountTokenCreator` role granted to the [Dialogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
      },
      &quot;serviceAgentAuth&quot;: &quot;A String&quot;, # Optional. Indicate the auth token type generated from the [Diglogflow service agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). The generated token is sent in the Authorization header.
      &quot;uri&quot;: &quot;A String&quot;, # Required. The webhook URI for receiving POST requests. It must use https protocol.
      &quot;username&quot;: &quot;A String&quot;, # The user name for HTTP Basic authentication.
      &quot;webhookType&quot;: &quot;A String&quot;, # Optional. Type of the webhook.
    },
    &quot;service&quot;: &quot;A String&quot;, # Required. The name of [Service Directory](https://cloud.google.com/service-directory) service. Format: `projects//locations//namespaces//services/`. `Location ID` of the service directory must be the same as the location of the agent.
  },
  &quot;timeout&quot;: &quot;A String&quot;, # Webhook execution timeout. Execution is considered failed if Dialogflow doesn&#x27;t receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
}</pre>
</div>

</body></html>